﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Comain.RBAC
{
    /// <summary>
    /// 会员
    /// </summary>
    public class T_Member
    {
        [Key]
        public Guid Member_Id { get; set; }
        
        /// <summary>
        /// 用户名称
        /// </summary>
        [StringLength(50)]
        public string Member_Name { get; set; }

        /// <summary>
        /// 用户密码
        /// </summary>
        [StringLength(50)]
        public string Member_Pwd { get; set; }

        /// <summary>
        /// 会员手机号
        /// </summary>
        public string Tel_Phone { get; set; }

        /// <summary>
        /// 身份证号码
        /// </summary>
        public string Member_Card { get; set; }

        /// <summary>
        /// 出生日期
        /// </summary>
        public DateTime BirthDay { get; set; }

        /// <summary>
        /// 积分
        /// </summary>
        public int Score { get; set; }

        /// <summary>
        /// 余额
        /// </summary>
        public decimal Money { get; set; }

        /// <summary>
        /// 会员等级  逻辑外键
        /// </summary>
        public int MemberLevel_Id { get; set; }

        /// <summary>
        /// 会员性别
        /// </summary>
        public int Gender { get; set; }

        /// <summary>
        /// 逻辑删除  未删除false 删除true
        /// </summary>
        public bool IsDeleted { get; set; } = false;

        /// <summary>
        /// 创建时间  
        /// </summary>
        public DateTime CreateTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 默认状态
        /// </summary>
        public bool State { get; set; } = true;

        /// <summary>
        /// 错误次数
        /// </summary>
        public int Member_ErrorCount {  get; set; }

        /// <summary>
        /// 账号锁定(true代表锁定，false代表猥琐点)
        /// </summary>
        public bool Member_IsIock { get; set; } = false;

        //公共字段(审计字段)逻辑删除字段  添加人  添加时间  修改人  修改时间  删除人 删除时间
    }
}
